package com.lin.cloud.disk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lin.cloud.disk.entity.dto.LogicDeleteStatusDTO;
import com.lin.cloud.disk.entity.pojo.File;
import com.lin.cloud.disk.entity.request.CountTotalSizeRequest;
import com.lin.cloud.disk.entity.request.file.BatchMoveFileRequest;
import com.lin.cloud.disk.entity.request.file.GetUserFileRequest;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.util.List;

/**
 * 文件表(File)表数据库访问层
 *
 * @author ljc
 * @since 2021-02-03 17:40:47
 */
@Repository
public interface FileMapper extends BaseMapper<File> {



    /**
     * 获取用户文件列表
     * @param request
     * @return
     */
    List<File> getFileList(GetUserFileRequest request);

    /**
     * 逻辑处理删除状态
     * @param deleteStatusDTO
     * @return
     */
    Integer logicDeleteOrRecover(LogicDeleteStatusDTO deleteStatusDTO);

    /**
     * 统计总文件大小
     * @param request
     * @return
     */
    BigInteger countTotalFileSize(CountTotalSizeRequest request);

    /**
     * 获取用户文件列表
     * @param request
     * @return
     */
    List<File> getFileResourceZoneList(GetUserFileRequest request);

    /**
     * 通过ID删除
     * @param id
     */
    Integer deleteById(Long id);

    /**
     * 批量移动文件
     * @param request
     */
    void batchMoveFile(BatchMoveFileRequest request);
}